package company.chubao;

import java.util.Scanner;

public class Chu2 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long l = sc.nextLong();
        String s = Long.toBinaryString(l);
        int length = s.length();
        int count = 0;
        for (int i = 0; i < length; i++) {
            if (s.charAt(i) == '1')
                count++;
        }
        System.out.println(count);
    }
}
